package com.ljwy.gun.adapter;

import android.content.Context;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.ljwy.gun.R;
import com.rscja.deviceapi.entity.UHFTAGInfo;

import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

public class EpcAdapter extends BaseViewAdapter<String> {

    public EpcAdapter(Context context, List<String> list) {
        super(context, list);
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        ViewHolder holder;
        if (convertView == null) {
            convertView = View.inflate(context, R.layout.adapter_epc, null);
            holder = new ViewHolder(convertView);
            convertView.setTag(holder);
        } else {
            holder = (ViewHolder) convertView.getTag();
        }
        Log.e("TAG",list.size()+"================");
        holder.epcTv.setText(list.get(position));
        return convertView;
    }

    static
    class ViewHolder {
        @BindView(R.id.epc_tv)
        TextView epcTv;

        ViewHolder(View view) {
            ButterKnife.bind(this, view);
        }
    }
}
